<template>
  <div style="width: 100%;height: 100%">
    <van-nav-bar style="background-color: #73b9ff;position:fixed;z-index:100;height:3rem;width: 100%;top: 0" left-arrow>
      <template #left>
        <el-avatar
          src="required('src/assets/logo.png')">
        </el-avatar>
      </template>
      <template #right>
        <van-popover
          v-model="showPopover"
          trigger="click"
          :actions="actions"
          @select="onSelect"
          placement="bottom-end"
        >
          <template #reference>
            <van-icon name="plus" size="18"/>
          </template>
        </van-popover>
      </template>
    </van-nav-bar>
  </div>
</template>

<script>
  import { IndexBar, IndexAnchor } from 'vant';
  export default {

    name: "ContactView",
    data() {
      return {
        active: 0,
        showPopover: false,
        // 通过 actions 属性来定义菜单选项
        actions: [{ text: '选项一' }, { text: '选项二' }, { text: '选项三' }],
      };
    },
    methods: {
      onSelect(action) {
        console.log(action.text);
      },
    },
  }
</script>

<style scoped>
  .chat_list_box{
    width: 100%;
    margin-top: 3rem;
  }
</style>
